I am writing a dxl that launches a dialog box which has multiple fields/tabs etc. . |
Re: How to detect radioBox button selection after launching DB ?
In DXL all dialog box elements support an 'on change' callback, that can be defined using 'set'.
string toppings[] = { "Beef", "Cheese", "Pepperoni", "Sausage" }
DB pizzaDB = create "Pizza Box"
DBE radioBoxDBE = radioBox (pizzaDB, "Topping", toppings, 2)
DBE myList = list (pizzaDB, "Topping", 150, 3, toppings, 4)
// callback that will be called when the radio box value changes
void doRadioBox(DBE dbe) {
int nr = get radioBoxDBE
print "Topping " (toppings[nr]) ".was selected ...\n"
}
void doSelectList (DBE dbe) {
int nr = get myList
print "List selection changed: " toppings[nr] "\n"
}
void doActivateList (DBE dbe) {
int nr = get myList
print "List Activation: " toppings[nr] "\n"
}
set(radioBoxDBE, doRadioBox) // set 'change' callback
set(myList, doSelectList, doActivateList) // lists support single click and double click callbacks
show pizzaDB
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
|
Re: How to detect radioBox button selection after launching DB ? Mathias Mamsch - Fri Feb 10 05:47:06 EST 2012
In DXL all dialog box elements support an 'on change' callback, that can be defined using 'set'.
string toppings[] = { "Beef", "Cheese", "Pepperoni", "Sausage" }
DB pizzaDB = create "Pizza Box"
DBE radioBoxDBE = radioBox (pizzaDB, "Topping", toppings, 2)
DBE myList = list (pizzaDB, "Topping", 150, 3, toppings, 4)
// callback that will be called when the radio box value changes
void doRadioBox(DBE dbe) {
int nr = get radioBoxDBE
print "Topping " (toppings[nr]) ".was selected ...\n"
}
void doSelectList (DBE dbe) {
int nr = get myList
print "List selection changed: " toppings[nr] "\n"
}
void doActivateList (DBE dbe) {
int nr = get myList
print "List Activation: " toppings[nr] "\n"
}
set(radioBoxDBE, doRadioBox) // set 'change' callback
set(myList, doSelectList, doActivateList) // lists support single click and double click callbacks
show pizzaDB
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
Thanks for your quick response ; I did not know that the DXL community was so speedy! Thank you so much! This is exactly what I was looking for !!! AWESOME ! |